<?php
/*
 * Created on Nov 6, 2011
 *
 * Based on: http://www.phpriot.com/articles/images-in-mysql/8
 * 
 */

if(isset($photo)){
	header("Content-type: ".$photo->imageType);
	$size_key = "image_data_large";
	switch(strtolower($_GET["size"])){
		case "m":
			echo $photo->imageDataMed;
			break;
		case "t":
			echo $photo->imageDataThumb;
			break;
		default:
			echo $photo->imageDataLarge;
			break;
	}
}
?>
